# 类的定义
# class Car:
#     wheel=4
#     def drive(self):
#         print('能跑')
# car=Car()
# print(car.wheel)
# car.drive()

'''
----案例：学生类----
编写一个学生类：
属性：姓名、性别、类别默认为people
方法：hello

'''
class Student:
    def __init__(self,name,sex):
        self.name=name
        self.sex=sex
        self.category='people'

    def hello(self):
        print(f'大家好，我叫{self.name}')

zhangsan=Student('zhangsan','nan')
print(zhangsan.category)
zhangsan.hello()

lisi=Student('lisi','nan')
# print(lisi.category)
lisi.hello()